<%-- 
    Document   : EL1
    Created on : 2014/8/18, 下午 03:19:57
    Author     : gjun
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%
 request.setAttribute("x","Hi");
 session.setAttribute("y","Hello");
 application.setAttribute("z","World");
 request.setAttribute("y", "y");
 request.setAttribute("z", "z");
 
%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>Hello World!</h1>
       
         ${x}<br>
          ${sessionScope.y}<br>
           ${applicationScope.z}<br>
           
          <%= request.getParameter("id") %> <br>
           ${param.id}    
           <c:if test="${ param.id ==null}">
            沒輸入
        </c:if> 
        <c:if test="${ empty param.id }">
            沒輸入2
        </c:if>    
                 
    </body>
</html>
